package com.company.decorator;

/**
 * 具体装饰器(ConcreteDecorator)角色，车衣装饰器类，CY是车衣的缩写
 */
public class CYCarDecorator extends CarDecorator {
    private String description = "车衣";

    public CYCarDecorator(Car car){
        super(car);
    }

    @Override
    public String getDescription() {
        return super.getDescription() + " + "+ description;
    }

    /**
     * 车衣价格，假设3万
     * @return
     */
    @Override
    public int getPrice() {
        return super.getPrice() + 3;
    }
}
